<div class="form">

    <?php
    $form = $this->beginWidget('CActiveForm', array(
                'id' => 'agencia-form',
                'enableAjaxValidation' => false,
                'focus' => array($model, 'codigo')
            ));
    ?>

    <div class="message info">Campos con * son requeridos.</div>

    <?php if (Yii::app()->user->hasFlash('agencia')): ?>
        <p class="message success">
        <?php echo Yii::app()->user->getFlash('agencia'); ?>
    </p>
    <?php endif; ?>

        <p>
        <?php echo $form->labelEx($model, 'codigo'); ?>
        <?php echo $form->textField($model, 'codigo', array('size' => 30, 'maxlength' => 30, 'class' => 'text')); ?>
        <?php echo Nhtml::error($model, 'codigo'); ?>
    </p>

    <p>
        <?php echo CHtml::submitButton('Guardar', array('class' => 'submit')); ?>
    </p>

    <?php $this->endWidget(); ?>

</div><!-- form -->